realtek: pcs: use ARRAY_SIZE kernel macro
authorJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 5 Jan 2026 14:44:41 +0000 (14:44 +0000)
committerRobert Marko <robimarko@gmail.com>
Wed, 7 Jan 2026 09:46:54 +0000 (10:46 +0100)
commit3753805b2aa01fc132b774c8964f004f75da0e9b
tree61935fc492b900f0fd2c888811ca4ada411321a1
parent7aa7e97e531c75f7fdbb68ca032b19bad0c1cbbe
realtek: pcs: use ARRAY_SIZE kernel macro

In the RTL931X configuration code, the array size of configuration
arrays was still calculated with 'sizeof(...) / sizeof(...)'. There's a
dedicated macro in the kernel for exactly that usecase. Use that instead
to avoid possible errors and make the line shorter. The RTL930X code is
already doing it the good way.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21410
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c